package com.yunfei.api.user.param;

import com.yunfei.api.user.contants.ValitationConstant;
import com.yunfei.contants.ValitationConstantMessage;
import org.apache.commons.lang.builder.ToStringBuilder;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 账号登录
 */
public class AccountLoginParam implements java.io.Serializable{
    private long id;
    @Pattern(regexp=ValitationConstant.MOBILE_REG, message= ValitationConstantMessage.MOBILE_REG_MESSAGE)
    private String mobile;
    @Pattern(regexp = ValitationConstant.PASSWORD_REG,message = ValitationConstantMessage.PASSWORD_REG_MESSAGE)
    private String password;
    @NotNull(message =ValitationConstantMessage.IMG_CODE_NOTNULL )
    private String imgCode;

    public String getImgCode() {
        return imgCode;
    }

    public void setImgCode(String imgCode) {
        this.imgCode = imgCode;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {

        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}